	<?php 
	$CI = & get_instance();
	$CI->load->model('Mproduct');
	$lang  ='vn' ;
	if($lang == 'en')
		$lg = 2;
	else $lg =1;

$flag = 0;
 $ur = $CI->uri->segment(2);
	if($ur == '' )
	{
		$flag=1;	
	}
		$arrCate = $result;
		$row2 = $arrCate;
		if(empty($row))
		{
			if (empty($row2))
			{
			$row2[0]['cat_id'] = $CI->uri->segment(3);
			$row1 = $CI->Mproduct->info_from_cat($row2[0]['cat_id']);
			if(!empty($row1))
				$row2[0]['cat_name'] =$row1[0]['cat_name'];
			}
			else
			{
				foreach($row2 as $i)
					$r = $i['cat_id'];
				$row1 = $CI->Mproduct->info_from_cat($r);
				$row2[0]['cat_name'] =$row1[0]['cat_name'];
			
			}
	
		}
		if($flag != 1)
		{
			?>
            <div class="sitemap">           
            	<a  href="<?php echo base_url()?>index.php"style="background-image:none">Trang chủ</a>
                <a href="<?php echo base_url()?>index.php/products">Dịch vụ</a>
                <a href="index.html"><?php echo '<a href="'.base_url().'index.php/products/category/'.$row2[0]['cat_id'].'" >'.$row2[0]['cat_name'].' </a>'?></a>
              </div>
              <div class="sitemap_tail"></div>
            <div class="clear"></div>
            <p class="td_sub_module"><?php echo $row2[0]['cat_name']?></p>
             <p class="conten_sub_p"><?php if(isset($row1)) echo  html_entity_decode( $row1[0]['cat_content'],ENT_QUOTES,"UTF-8")?></p>
             <p class="mautk">Hình Mẫu:</p>
            <?php }
			else 
			{		
				?>	
              <div class="sitemap">           
            	<a  href="<?php echo base_url()?>index.php"style="background-image:none">Trang chủ</a>
                <a href="<?php echo base_url()?>index.php/products">Dịch vụ</a>             
              </div>
              <div class="sitemap_tail"></div>
            <div class="clear"></div>
            <p class="td_sub_module">Dịch vụ</p>
             <p class="conten_sub_p"><?php echo  html_entity_decode( $row1[0]['cat_content'],ENT_QUOTES,"UTF-8")?></p>
             <p class="mautk">Hình Mẫu:</p>
			<?php 
			}
	if(!empty($arrCate))
		{ 
			foreach($arrCate as $item)
			{?>
				 <div class="khung_img">
           		<a href="<?php echo base_url()?>upload/product/<?php echo $item['prod_image']?>" rel="lightbox[roadtrip]">
                <img src="<?php echo base_url()?>upload/product/<?php echo $item['prod_image']?>"/>
                </a>
      			</div>
		<?php }
				$p = $u = $CI->uri->segment(4);
				if (isset($p))
					$p = $p + 1;
				else
					$p = 1;
			echo '<div class="clear"></div><div class="pager">Trang số : '.$p.'</div><div class="page">'.$page.'</div>';
		}
	else
		echo "<b class='cap_nhat'> Dữ liệu đang cập nhật</b>";			
?>
    
    
    